#include<iostream>
#include<unistd.h>
#include<vector>
#include"Thread.hpp"

using namespace std;

void Print()
{
    while(true)
    {
        printf("haha, 我是一个封装的线程...\n"); 
        sleep(1); 
    }
}

int main()
{
    std::vector<Thread> threads;

    for(int i = 0; i <10; i++)
    {
        threads.push_back(Thread(Print)); 
    }

    for(auto &t : threads)
    {
        t.Run(); 
    }

    for(auto &t : threads)
    {
        t.Join(); 
    }
    return 0;
}
